

<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico"> 
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <style>
      .radio-inline input[type=radio] {
    margin-top: 4px;
}
    </style>
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">TI费用申请</h2>
    </div>
    <!-- 标题 -->
    <div>
    <form action=""  class="form-inline">
      <table class="row-margin-top tab-content table-bordered table" border="1" style="margin-bottom:0">
          <tr>
            <td style="min-width: 160px;width: 160px" class="text-center"><label for="" class="form-label">活动主题</label><span class="colorRed">*</span></td>
            <td colspan="3"><input type="text" class="form-control" name="" value="" id="theme" style="width: 60%"></td>
            <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">申请类型</label></td>
            <td colspan="3">
                <label for="customlei">
                    <input type="radio" name="leibie" id="customlei" value="1">客户类
                </label>&nbsp;&nbsp;
                 <label for="netlei">
                    <input type="radio" name="leibie" id="netlei" checked value="2">网点类
                </label>
            </td>
        </tr>
        <tr>
            <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">活动经销商<span class="colorRed">*</span></label></td>
            <td colspan="3">
                   <div style="width:100%;" class="row">
                        <div class="col-xs-7">
                            <div class="input-group" id="jxs_input" style="width: 100%">
                                <input type="text"   placeholder="请输入关键字或空格查询" class="form-control inputremindPeple" id="activeAgency"  value="" style="width: 100%">
                                <div class="input-group-btn">
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                            <div id="jxs_queding" class="selectedOnlyOne" style="display: none;">
                                <input type="hidden" name="ckdx">
                                <input type="hidden" name="ckdx_name">
                                <span class="inin"></span>
                                <span class="close">×</span>
                            </div>
                        </div>
                          <div class="col-md-1">  <a href="javascript:;" id="selectName">选择</a></div>
                    </div>

            </td>
              <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">产品维度</label><span class="colorRed">*</span></td>
            <td colspan="3">
                <label for="pinlei">
                    <input type="radio" name="proweidu" id="pinlei" checked value="0">品类
                </label>&nbsp;&nbsp;
                 <label for="xilie">
                    <input type="radio" name="proweidu" id="xilie" value="1">系列
                </label>&nbsp;&nbsp;
                <label for="sku">
                    <input type="radio" name="proweidu" id="sku" value="2">SKU
                </label>&nbsp;&nbsp;
                 <label for="danpin">
                    <input type="radio" name="proweidu" id="danpin" value="3">单品
                </label>
            </td>
        </tr>
        <tr>
             <td style="min-width: 160px;width: 160px" class="text-center">
                <label for="" class="form-label">是否新进货<span class="colorRed">*</span><img src="__STATIC__/layout/img/helptitle.png" alt="" style="width: 16px;height: 16px;display: inline-block;vertical-align: middle;" title="注：如果选择新进货，需要填写进货时段和承诺进货额。"></label>
             </td>
             <td>
                 <label for="customlei">
                    <input type="radio" name="is_jinhuo" id="customlei" checked value="1">进货
                </label>&nbsp;&nbsp;
                 <label for="netlei">
                    <input type="radio" name="is_jinhuo" id="netlei" value="2">不进货
                </label>
             </td>
             <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">进货时段</label><span class="colorRed">*</span></td>
             <td>
                 <div class="form-group">
                        <input type="text" id="start" class="form-control layer-date "
                               style="width: 110px;min-width: 100px;display: inline-block;" name="end" value="" >
                    </div>
                    <div class="form-group">
                        至
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control layer-date"
                               style="width: 110px;min-width: 100px;display: inline-block;" id="end"
                               name="end" value="">
                    </div>
             </td>
           <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">承诺进货额</label><span class="colorRed">*</span></td>
           <td><input type="text" class="form-control" name="" id="chnuojhe" value="">元</td>
            <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">预计进货费比</label><img src="__STATIC__/layout/img/helptitle.png" alt="" style="width: 16px;height: 16px;display: inline-block;vertical-align: middle;" title="注：预计进货费比=总预计费用额/承诺进货额"></td>
           <td><input type="text" class="form-control" name="" id="chnuojhe" value="" disabled>%</td>
        </tr>
        <tr>
           <td style="min-width: 160px;width: 160px" class="text-center">
                <label for="" class="form-label">使用角色<span class="colorRed">*</span>：</label>
             </td>
             <td colspan="7">
                <select name="" id="useRole" class="form-control select">
                    <option value="0">请选择</option>
                    <option value="1">张晓明</option>
                </select>
                <span>请选择使用哪个角色提交该申请，审批流程会根据选择的角色提交到对应的上级领导。</span>
             </td>
        </tr>
         <tr id="netChange">
           <td style="min-width: 160px;width: 160px" class="text-center">
                <label for="" class="form-label">拆分人<span class="colorRed">*</span>：</label>
             </td>
             <td colspan="7">
                <select name="" id="chaifenMan" class="form-control select">
                    <option value="0">请选择</option>
                    <option value="1">曾小倩</option>
                </select>
             </td>
        </tr>
      </table>
    <p class="padding-10">
        <a href="javascript:;" class="btn btn-info" id="addcostdetail">+添加费用明细</a>
    </p>
    <p style="line-height: 36px;background: #fffa9e;padding: 0 10px;border:1px solid #ccc" class="colorRed">费用申请说明：1.如未达到当月承诺未税进货金额，则促销费用按实际未税进货金额比例相应减少</p>
    <div class="form-group" style="margin:20px 10px 20px 20px">
        <input type="file" id="exampleInputFile">
        <p class="help-block" style="color:#1295d2">注：最多上传15个文件，每个文件小于50M,支持格式：</p>
        <p class="help-block" style="color:#1295d2;">jpg,bnp,gif,png,jpeg,tif,raw,doc,docx,xls,xlsx,ppt,pptx,txt,pdf,rar,zip,mp4,avi,rmvb,rm,mid,3gp,AVI,3GP,,mpg,mp3,wma,wav</p>
    </div>
     <div class="row sub_btn" style="width:100%;text-align:center;padding: 20px 0">
        <input type="button" class="btn btn-success" id="saveCao" value="保存为草稿">
        <input type="button" class="btn btn-info" id="saveUp" value="保存并提交工作流">
        <input type="button" class="btn btn-warning" value="返回" onclick="back()">
    </div>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <!-- <script src="js/plugins/layer/laydate/laydate.js"></script> -->
      <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
      <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
   <script>

     //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY-MM-DD',
//        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY-MM-DD',
//        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
        function back(){
            history.go(-1)
        }

    
/*申请类型*/
      $("input:radio[name=leibie]").click(function () {
            if ($("input:radio[name=leibie]:checked").val()==2) {
                $("#netChange").show()
            } else {
                  $("#netChange").hide()
            }
        });

/*是否新进货*/
 $("input:radio[name=is_jinhuo]").click(function () {
            if ($("input:radio[name=is_jinhuo]:checked").val()==2) {
                $("#start").attr("disabled",true);
                $("#end").attr("disabled",true);
                $("#chnuojhe").attr("disabled",true);
            } else {
                  $("#start").removeAttr("disabled");
                $("#end").removeAttr("disabled");
                $("#chnuojhe").removeAttr("disabled");
            }
        });

 /*添加费用明细*/
 $("#addcostdetail").click(function(){
      if($("#theme").val()==""){
             swal("","活动主题不能为空！","error")
        }else if($("#activeAgency").val()==""){
             swal("","活动经销商不能为空","error")
        }else if($("#useRole").val()=="0"){
             swal("","请选择使用角色","error")
        }else if($("#chaifenMan").val()=="0"){
             swal("","请选择拆分人","error")
        }else{
            location.href="{:url('other/addcostdetail')}"
        }
 })
   </script>
</body>

</html>
